determine the domain and range of a graph